#ifndef SWEFUNCTIONS_HPP
#define SWEFUNCTIONS_HPP

#include "typeAliases.hpp"
#include "field.hpp"

namespace hms
{

scalar courantTimeStep(
	scalar area, scalar circumference, const Ref<const Array2s>& v, scalar d
);

template<typename CellType, typename MeshType>
scalar courantTimeStep(
	const CellType& cell,
	const Field<MeshType>& v,
	const Field<MeshType>& d
);

scalar chezy( scalar d, scalar n );

// scalar wavespeed( scalar d );
template<typename D>
auto wavespeed( const D& d ) -> decltype(auto);

scalar froude( scalar, scalar );

auto froudes (
	const Array2Xs& velocities,
	const Array1Xs& waterdepths)
-> Array1Xs;

template<typename Derived1, typename Derived2>
decltype(auto) isSupercritical(
	const Eigen::DenseBase<Derived1>& velocity,
	const Eigen::DenseBase<Derived2>& waterdepth
);


} // end namespace hms

#include "sweFunctions.tpp"

#endif
